//
//  DHS2_PreOrder_AddressCell.m
//  Dresshere
//
//  Created by ZhangPeng on 2018/6/10.
//  Copyright © 2018年 张朋. All rights reserved.
//

#import "DHS2_PreOrder_AddressCell.h"

@implementation DHS2_PreOrder_AddressCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (IBAction)couponAction:(id)sender {
    
}

- (void)updateCell:(NSDictionary *)dic{
    if ([dic objectForKey:@"phone"]) {
        self.nameLabel.text = [dic objectForKey:@"contact"];
        self.addressLabel.text = [NSString stringWithFormat:@"%@%@%@%@",[dic objectForKey:@"province"],[dic objectForKey:@"city"],[dic objectForKey:@"district"],[dic objectForKey:@"accurate"]];
        self.phoneLabel.text = [dic objectForKey:@"phone"];
        self.addressHintLabel.hidden = YES;
    }else{
//        self.phoneLabel.text = [Login curLoginUser].phone;
        self.addressHintLabel.hidden = NO;
    }
}

- (void)updateCellTemAddress:(Address *)address{
    self.nameLabel.text = address.name;
    self.addressLabel.text = [NSString stringWithFormat:@"%@%@%@%@",address.province? :@"",address.city? :@"",address.district? :@"",address.address? :@""];
    self.phoneLabel.text = address.phone;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
